home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / zpbsvx.z / zpbsvx
Encoding:
Text File  |  2002-10-03  |  12.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ZPBSVX - use the Cholesky factorization A = U**H*U or A = L*L**H to
  10.      compute the solution to a complex system of linear equations A * X = B,
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE ZPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, EQUED,
  14.                         S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, RWORK,
  15.                         INFO )
  16.  
  17.          CHARACTER      EQUED, FACT, UPLO
  18.  
  19.          INTEGER        INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
  20.  
  21.          DOUBLE         PRECISION RCOND
  22.  
  23.          DOUBLE         PRECISION BERR( * ), FERR( * ), RWORK( * ), S( * )
  24.  
  25.          COMPLEX*16     AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ), WORK( *
  26.                         ), X( LDX, * )
  27.  
  28. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  29.      These routines are part of the SCSL Scientific Library and can be loaded
  30.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  31.      directs the linker to use the multi-processor version of the library.
  32.  
  33.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  34.      4 bytes (32 bits). Another version of SCSL is available in which integers
  35.      are 8 bytes (64 bits).  This version allows the user access to larger
  36.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  37.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  38.      only one of the two versions; 4-byte integer and 8-byte integer library
  39.      calls cannot be mixed.
  40.  
  41. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  42.      ZPBSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
  43.      compute the solution to a complex system of linear equations A * X = B,
  44.      where A is an N-by-N Hermitian positive definite band matrix and X and B
  45.      are N-by-NRHS matrices.
  46.  
  47.      Error bounds on the solution and a condition estimate are also provided.
  48.  
  49.  
  50. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  51.      The following steps are performed:
  52.  
  53.      1. If FACT = 'E', real scaling factors are computed to equilibrate
  54.         the system:
  55.            diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
  56.         Whether or not the system will be equilibrated depends on the
  57.         scaling of the matrix A, but if equilibration is used, A is
  58.         overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
  75.         factor the matrix A (after equilibration if FACT = 'E') as
  76.            A = U**H * U,  if UPLO = 'U', or
  77.            A = L * L**H,  if UPLO = 'L',
  78.         where U is an upper triangular band matrix, and L is a lower
  79.         triangular band matrix.
  80.  
  81.      3. If the leading i-by-i principal minor is not positive definite,
  82.         then the routine returns with INFO = i. Otherwise, the factored
  83.         form of A is used to estimate the condition number of the matrix
  84.         A.  If the reciprocal of the condition number is less than machine
  85.         precision, INFO = N+1 is returned as a warning, but the routine
  86.         still goes on to solve for X and compute error bounds as
  87.         described below.
  88.  
  89.      4. The system of equations is solved for X using the factored form
  90.         of A.
  91.  
  92.      5. Iterative refinement is applied to improve the computed solution
  93.         matrix and calculate error bounds and backward error estimates
  94.         for it.
  95.  
  96.      6. If equilibration was used, the matrix X is premultiplied by
  97.         diag(S) so that it solves the original system before
  98.         equilibration.
  99.  
  100.  
  101. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  102.      FACT    (input) CHARACTER*1
  103.              Specifies whether or not the factored form of the matrix A is
  104.              supplied on entry, and if not, whether the matrix A should be
  105.              equilibrated before it is factored.  = 'F':  On entry, AFB
  106.              contains the factored form of A.  If EQUED = 'Y', the matrix A
  107.              has been equilibrated with scaling factors given by S.  AB and
  108.              AFB will not be modified.  = 'N':  The matrix A will be copied to
  109.              AFB and factored.
  110.              = 'E':  The matrix A will be equilibrated if necessary, then
  111.              copied to AFB and factored.
  112.  
  113.      UPLO    (input) CHARACTER*1
  114.              = 'U':  Upper triangle of A is stored;
  115.              = 'L':  Lower triangle of A is stored.
  116.  
  117.      N       (input) INTEGER
  118.              The number of linear equations, i.e., the order of the matrix A.
  119.              N >= 0.
  120.  
  121.      KD      (input) INTEGER
  122.              The number of superdiagonals of the matrix A if UPLO = 'U', or
  123.              the number of subdiagonals if UPLO = 'L'.  KD >= 0.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      NRHS    (input) INTEGER
  141.              The number of right-hand sides, i.e., the number of columns of
  142.              the matrices B and X.  NRHS >= 0.
  143.  
  144.      AB      (input/output) COMPLEX*16 array, dimension (LDAB,N)
  145.              On entry, the upper or lower triangle of the Hermitian band
  146.              matrix A, stored in the first KD+1 rows of the array, except if
  147.              FACT = 'F' and EQUED = 'Y', then A must contain the equilibrated
  148.              matrix diag(S)*A*diag(S).  The j-th column of A is stored in the
  149.              j-th column of the array AB as follows:  if UPLO = 'U',
  150.              AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j; if UPLO = 'L',
  151.              AB(1+i-j,j)    = A(i,j) for j<=i<=min(N,j+KD).  See below for
  152.              further details.
  153.  
  154.              On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
  155.              diag(S)*A*diag(S).
  156.  
  157.      LDAB    (input) INTEGER
  158.              The leading dimension of the array A.  LDAB >= KD+1.
  159.  
  160.      AFB     (input or output) COMPLEX*16 array, dimension (LDAFB,N)
  161.              If FACT = 'F', then AFB is an input argument and on entry
  162.              contains the triangular factor U or L from the Cholesky
  163.              factorization A = U**H*U or A = L*L**H of the band matrix A, in
  164.              the same storage format as A (see AB).  If EQUED = 'Y', then AFB
  165.              is the factored form of the equilibrated matrix A.
  166.  
  167.              If FACT = 'N', then AFB is an output argument and on exit returns
  168.              the triangular factor U or L from the Cholesky factorization A =
  169.              U**H*U or A = L*L**H.
  170.  
  171.              If FACT = 'E', then AFB is an output argument and on exit returns
  172.              the triangular factor U or L from the Cholesky factorization A =
  173.              U**H*U or A = L*L**H of the equilibrated matrix A (see the
  174.              description of A for the form of the equilibrated matrix).
  175.  
  176.      LDAFB   (input) INTEGER
  177.              The leading dimension of the array AFB.  LDAFB >= KD+1.
  178.  
  179.      EQUED   (input or output) CHARACTER*1
  180.              Specifies the form of equilibration that was done.  = 'N':  No
  181.              equilibration (always true if FACT = 'N').
  182.              = 'Y':  Equilibration was done, i.e., A has been replaced by
  183.              diag(S) * A * diag(S).  EQUED is an input argument if FACT = 'F';
  184.              otherwise, it is an output argument.
  185.  
  186.      S       (input or output) DOUBLE PRECISION array, dimension (N)
  187.              The scale factors for A; not accessed if EQUED = 'N'.  S is an
  188.              input argument if FACT = 'F'; otherwise, S is an output argument.
  189.              If FACT = 'F' and EQUED = 'Y', each element of S must be
  190.              positive.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))
  203.  
  204.  
  205.  
  206.      B       (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
  207.              On entry, the N-by-NRHS right hand side matrix B.  On exit, if
  208.              EQUED = 'N', B is not modified; if EQUED = 'Y', B is overwritten
  209.              by diag(S) * B.
  210.  
  211.      LDB     (input) INTEGER
  212.              The leading dimension of the array B.  LDB >= max(1,N).
  213.  
  214.      X       (output) COMPLEX*16 array, dimension (LDX,NRHS)
  215.              If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to the
  216.              original system of equations.  Note that if EQUED = 'Y', A and B
  217.              are modified on exit, and the solution to the equilibrated system
  218.              is inv(diag(S))*X.
  219.  
  220.      LDX     (input) INTEGER
  221.              The leading dimension of the array X.  LDX >= max(1,N).
  222.  
  223.      RCOND   (output) DOUBLE PRECISION
  224.              The estimate of the reciprocal condition number of the matrix A
  225.              after equilibration (if done).  If RCOND is less than the machine
  226.              precision (in particular, if RCOND = 0), the matrix is singular
  227.              to working precision.  This condition is indicated by a return
  228.              code of INFO > 0.
  229.  
  230.      FERR    (output) DOUBLE PRECISION array, dimension (NRHS)
  231.              The estimated forward error bound for each solution vector X(j)
  232.              (the j-th column of the solution matrix X).  If XTRUE is the true
  233.              solution corresponding to X(j), FERR(j) is an estimated upper
  234.              bound for the magnitude of the largest element in (X(j) - XTRUE)
  235.              divided by the magnitude of the largest element in X(j).  The
  236.              estimate is as reliable as the estimate for RCOND, and is almost
  237.              always a slight overestimate of the true error.
  238.  
  239.      BERR    (output) DOUBLE PRECISION array, dimension (NRHS)
  240.              The componentwise relative backward error of each solution vector
  241.              X(j) (i.e., the smallest relative change in any element of A or B
  242.              that makes X(j) an exact solution).
  243.  
  244.      WORK    (workspace) COMPLEX*16 array, dimension (2*N)
  245.  
  246.      RWORK   (workspace) DOUBLE PRECISION array, dimension (N)
  247.  
  248.      INFO    (output) INTEGER
  249.              = 0: successful exit
  250.              < 0: if INFO = -i, the i-th argument had an illegal value
  251.              > 0: if INFO = i, and i is
  252.              <= N:  the leading minor of order i of A is not positive
  253.              definite, so the factorization could not be completed, and the
  254.              solution has not been computed. RCOND = 0 is returned.  = N+1: U
  255.              is nonsingular, but RCOND is less than machine precision, meaning
  256.              that the matrix is singular to working precision.  Nevertheless,
  257.              the solution and error bounds are computed because there are a
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))                                                          ZZZZPPPPBBBBSSSSVVVVXXXX((((3333SSSS))))
  269.  
  270.  
  271.  
  272.              number of situations where the computed solution can be more
  273.              accurate than the value of RCOND would suggest.
  274.  
  275. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  276.      The band storage scheme is illustrated by the following example, when N =
  277.      6, KD = 2, and UPLO = 'U':
  278.  
  279.      Two-dimensional storage of the Hermitian matrix A:
  280.  
  281.         a11  a12  a13
  282.              a22  a23  a24
  283.                   a33  a34  a35
  284.                        a44  a45  a46
  285.                             a55  a56
  286.         (aij=conjg(aji))         a66
  287.  
  288.      Band storage of the upper triangle of A:
  289.  
  290.          *    *   a13  a24  a35  a46
  291.          *   a12  a23  a34  a45  a56
  292.         a11  a22  a33  a44  a55  a66
  293.  
  294.      Similarly, if UPLO = 'L' the format of A is as follows:
  295.  
  296.         a11  a22  a33  a44  a55  a66
  297.         a21  a32  a43  a54  a65   *
  298.         a31  a42  a53  a64   *    *
  299.  
  300.      Array elements marked * are not used by the routine.
  301.  
  302.  
  303. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  304.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  305.  
  306.      This man page is available only online.
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.